package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by DK on 16/10/10.
 * 产品品类
 */
@Entity
@Table(name = "product_categories")
@DynamicInsert
@DynamicUpdate
public class ProductCategories extends IDEntityMall{

    @Column(columnDefinition = "bigint comment '产品ID'")
    private Long productId;

    @Column(columnDefinition = "bigint comment '品类ID'")
    private Long categoryId;

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    @Override
    public String toString() {
        return "ProductCategories{" +
                "productId=" + productId +
                ", categoryId=" + categoryId +
                ", id=" + id +
                ", dateCreated=" + dateCreated +
                ", lastUpdated=" + lastUpdated +
                ", isDelete=" + isDelete +
                ", version=" + version +
                '}';
    }
}
